﻿/*
 * 由SharpDevelop创建。
 * 用户： PC
 * 日期: 2025/5/4
 * 时间: 1:06
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;
using System.Collections.Generic;

namespace DataAdapter
{
	/// <summary>
	/// Description of MyClass.
	/// </summary>
	public class MyClass
	{
		private MyClass() {}
	}
}

namespace BDSCSBox
{
	public static class TYPES
	{
		/// <summary>
		/// 消息回调
		/// </summary>
		/// <param name="s">收到的消息</param>
		/// <returns>是否放行</returns>
		public delegate bool F_FUNC(string s);
	}
	
	/// <summary>
	/// 数据处理统一接口
	/// </summary>
	public interface DataAdapter
	{
		/// <summary>
		/// 添加消息接收器
		/// </summary>
		/// <param name="f">接收回调</param>
		void addDataReceiver(TYPES.F_FUNC f);
		/// <summary>
		/// 移除消息接收器
		/// </summary>
		/// <param name="f">接收回调</param>
		void removeDataReceiver(TYPES.F_FUNC f);
		/// <summary>
		/// 添加消息发送监听器
		/// </summary>
		/// <param name="f">发送回调</param>
		void addDataSender(TYPES.F_FUNC f);
		/// <summary>
		/// 移除消息发送监听器
		/// </summary>
		/// <param name="f">发送回调</param>
		void removeDataSender(TYPES.F_FUNC f);
		/// <summary>
		/// 发送后台指令
		/// </summary>
		/// <param name="s">指令，原版指令暂不支持中文</param>
		/// <returns></returns>
		string sendMsg(string s);
		/// <summary>
		/// BDS主程序所在（相对）目录
		/// </summary>
		string workDir{get;}
	}
}
